<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
namespace App\Controller;

use Hyperf\DbConnection\Db;

class IndexController extends AbstractController
{

    public function index()
    {
        $u = Db::table('user')->orderBy('id','desc')->limit(2)->get();
        var_dump($u);

        $user = $this->request->input('user', 'Hyperf');
        $method = $this->request->getMethod();
        $data = [
            'method' => $method,
            'message' => "Hello {$user}.",
            'bb'=>[
                'aa'=>'cc'
            ]
        ];
        return $u;
    }

}
